package ExceptionTest;

public class Person {
    private int age;

    public int getAge() {
        return age;
    }

    public void setAge(int age) throws IllageAgeException {
        if(age<0||age>200){
            throw new IllageAgeException("年龄输入非法");
        }
        this.age = age;
    }
}
